<template>
  <div class="header-container">
    <span class="title">所属科目：{{ `${titInfo.kmdm}（${titInfo.kmmc}）` }}</span>
    <span class="title">所属学院：{{ `${titInfo.xydm}（${titInfo.xymc||'--'}）` }}</span>

    <span class="flex"></span>
    <slot></slot>
    <span class="label exit" @click="$router.back()"> 返回 </span>
  </div>
</template>

<script setup lang="ts">
import { onMounted } from 'vue'

const props = defineProps({
  // 试卷id
  titInfo: {
    type: Object,
    default: () => {},
  },
})

onMounted(() => {})
</script>

<style lang="less" scoped>
.header-container {
  width: 100%;
  height: 50px;
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 0 0px 5px 20px;

  .title {
    font-size: 18px;
    font-weight: bold;
    color: #3f4355;
    margin-right: 20px;
  }

  .time {
    margin-left: 30px;
    font-size: 100%;
    color: #3f4355;
  }

  .countdStyle {
    margin-left: 30px;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    color: orange;
  }

  .label {
    cursor: pointer;
    margin-right: 16px;
    margin-left: 5px;
    font-weight: 700;
  }

  .show {
    color: #00baad;
  }

  .restore {
    color: #3e98e8;
  }

  .error {
    color: rgb(240, 10, 10);
  }

  .exit {
    width: 100px;
    height: 36px;
    background: #136cc4;
    border-radius: 4px;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-left: 40px;
    cursor: pointer;
  }

  .line {
    height: 100%;
    width: 1px;
    background: #dddada;
  }
}
</style>
